package com.hyw.supply.exception;

import lombok.Data;

/**
 * @author zengzhiping
 * @Description: 基础异常
 * @date 2021-07-14
 */
@Data
public class BaseException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    protected Integer errCode;

    protected String errMsg;

    public BaseException() {
    }

    public BaseException(Throwable e) {
        super(e);
    }

    public BaseException(String errMsg) {
        super(errMsg);
        this.errMsg = errMsg;
    }

    public BaseException(Integer errCode,String errMsg) {
        super(errMsg);
        this.errMsg = errMsg;
        this.errCode = errCode;
    }

    public BaseException(String errMsg, Throwable e) {
        super(errMsg, e);
        this.errMsg = errMsg;
    }
}
